﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class User
    {
        #region Variable Declaration 
        private IDataRepository _dataObject;
        #endregion 

        public User(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateUser(this);
        }
        public void Update()
        {
            _dataObject.UpdateUser(this);
        }
        public void UpdateUserProfile()
        {
            _dataObject.UpdateUserProfile(this);
        }
        public void Delete()
        {
            _dataObject.DeleteUser(this);
        }
        public List<User> GetAllUsers()
        {
            return _dataObject.GetAllUsers();
        }
        public void GetUserById()
        {
            _dataObject.GetUserById(this);
        }
        public void GetUserByUserName()
        {
            _dataObject.GetUserByUserName(this);
        }
        public void GetUserByUniqueId()
        {
            _dataObject.GetUserByUniqueId(this);
        }
        public void ActivateUser()
        {
            _dataObject.ActivateUser(this);
        }
        public bool checkUserLogin()
        {
            return _dataObject.checkUserLogin(this);
        }
        public void UpdateBuilderId()
        {
            _dataObject.UpdateBuilderId(this);
        }
        public void UpdateArchitectId()
        {
            _dataObject.UpdateArchitectId(this);
        }
        public Country GetCountryById(int countryId)
        {
            return _dataObject.GetCountryById(countryId);
        }
        public State GetStateById(int stateId)
        {
            return _dataObject.GetStateById(stateId);
        }
    }
}
